########################################################################
# gmould.lib - GMOULD GtkWindow xml library
# Copyright (C) 2013 Mohamad Afifi Omar <afifio@gmail.com>
#
# These comments cannot be remove or edited and should remain intact
# because this file comments is an extension to the GPL3 license.
# This software file is covered by GPL version 3 license.
# Please see the LICENSE and gpl3.txt or gpl3.htm in doc directory
# for the license agreement, if its not exist, write to the 
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Modification below this line is allowed
########################################################################
# Extra credits to:
#
########################################################################
# Notes:
# Put notes to other future developer/contributor here
#
########################################################################
########################################################################
# ActionXXX - Collection of shared actions, since its separated,
# it can be call from any widgets too, thus introducing modularity
# Usage: ActionXXX param1 param2 etc ...
########################################################################
########################################################################
# SectionLanguage - Language selection/ default section page 1
# Usage: SectionLanguage
########################################################################
source $PROGLIB/gmould.form.sh


function SectionBasic()
{
source $PROGTMP/widget
echo '
<vbox space-fill="false" space-expand="true" spacing="0">
	'"$(gmH3 "$GMICON_MAST_WIDGET" "Basic $widget settings" 'Usually it should be...')"'
'
case $widget in
			"button" )
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"checkbox" )
				echo '<frame Basic directives>'
					fvariable
					flabel
					fdefaultbool
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"colorbutton" )
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
					fselectcolor
					fusealpha
				echo '</frame>';;
			"comboboxentry" ) 
				echo '<frame Basic directives>'
					fvariable
					fdefaulttext
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"comboboxtext" )
				echo '<frame Basic directives>'
					fvariable
					fdefaulttext
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"combobox" ) 
				echo '<frame Basic directives>'
					fvariable
					fdefaulttext
					fsensitive
				echo '</frame>';;
			"edit" ) 
				echo '<frame Basic directives>'
					fvariable
					fdefaulttext
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"entry" ) 
				echo '<frame Basic directives>'
					fvariable
					fdefaulttext
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"eventbox" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"expander" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"fontbutton" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					ffontselect
					ffontusefont
					ffontusesize
					fblockfxsignal
				echo '</frame>';;
			"frame" )
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					flabel
				echo '</frame>';;
			"hbox" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"hscale" ) 
				echo '<frame Basic directives>'
					fvariable
					fdefaultdouble
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fdefaultrange
					frangestep
					frangemax
					frangemin
					fblockfxsignal
				echo '</frame>';;
			"hseparator" );;
			"vseparator" ) ;;
			"list" )
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fdefaultitem
					fblockfxsignal
				echo '</frame>';;
			"menubar" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"menuitem" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"menuitemseparator" ) ;;
			"menu" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"notebook" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					ftablabel
					ftabbaseindex
					ftabprefix
					ftabsuffix
					fblockfxsignal
				echo '</frame>';;
			"pixmap" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"progressbar" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"radiobutton" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fdefaultbool
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"separator" ) ;;
			"spinbutton" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fdefaultrange
					frangemin
					frangemax
					frangestep
					fblockfxsignal
				echo '</frame>';;
			"statusbar" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fdefaulttext
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"table" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fselectedrow
					fexportedcolumn
					fcolumnvisible
					fcolumnheaderactive
					fautosort
					fsortcolumn
					fsortfunction
					ffreezethaw
					fblockfxsignal
				echo '</frame>';;
			"terminal" )
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					farg0
					fenvv0
					fblockfxsignal
				echo '</frame>';;
			"text" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"timer" )
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fmiliseconds
					finterval
					fblockfxsignal
				echo '</frame>';;
			"togglebutton" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fdefaultbool
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"tree" ) 
				echo '<frame Basic directives>'
					fvariable
					flabel
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				fexportedcolumn
				fselectedrow
				fautosort
				fsortcolumn
				fsortdirection
				fsortfunction
				fselectionmode
				fitemtree
				echo '</frame>';;
			"vbox" ) 
				echo '<frame Basic directives>'
					fvariable
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fblockfxsignal
				echo '</frame>';;
			"vscale" )
				echo '<frame Basic directives>'
					fvariable
					fdefaultdouble
					fsensitive
				echo '</frame>'
				echo '<frame Basic attributes>'
					fdefaultrange
					frangestep
					frangemax
					frangemin
					fblockfxsignal
				echo '</frame>';;
			"window" ) 
				echo '<frame Basic directives>'
					fvariable
					ftitle
					fsensitive
				echo '</frame>';;
 			* ) echo "";;
		esac
echo '</vbox>'
};export -f SectionBasic
function SectionCosmetic()
{
source $PROGTMP/widget
echo '
<vbox space-fill="false" space-expand="true">
	'"$(gmH3 "$GMICON_MAST_LOOKFEEL" "Look &amp; Feel" 'Make it beautiful and eye pleasing.')"'
'
	case $widget in
			"button" )
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
					fselecticon
				echo '</frame>';;
			"checkbox" );;
			"colorbutton" );;
			"comboboxentry" )
				echo '<frame Cosmetic attributes>'
					fhasframe
				echo '</frame>';;
			"comboboxtext" )
				echo '<frame Cosmetic attributes>'
					fhasframe
				echo '</frame>';;
			"combobox" ) ;;
			"edit" ) 
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"entry" ) 
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"eventbox" );;
			"expander" ) ;;
			"fontbutton" ) ;;
			"frame" ) ;;
			"hbox" ) 
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"vbox" ) 
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"hscale" ) 
				echo '<frame Cosmetic directives>'
					fpositionmark
				echo '</frame>';;
			"vscale" )
				echo '<frame Cosmetic directives>'
					fpositionmark
				echo '</frame>';;
			"hseparator" );;
			"list" )
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"menubar" );;
			"menuitemseparator" ) ;;
			"menuitem" ) 
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"menu" )
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"notebook" ) 
				echo '<frame Cosmetic attributes>'
					ftabposition
				echo '</frame>';;
			"pixmap" )
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
					fselectpixmap
				echo '</frame>';;
			"progressbar" ) ;;
			"radiobutton" );;
			"separator" ) ;;
			"spinbutton" );;
			"statusbar" );;
			"table" ) 
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>';;
			"terminal" )
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
				echo '</frame>'
				echo '<frame Cosmetic attributes>'
					fselectfont
					fbgtintcolor
					ftxtfgcolor
					ftxtbgcolor
					fboldfgcolor
					fdimfgcolor
					fcursorbgcolor
					fhighlightbgcolor
					fhighlightbgcolor
				echo '</frame>';;
			"text" ) ;;
			"timer" ) ;;
			"togglebutton" )
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
					fselecticon
				echo '</frame>';;
			"tree" ) 
				echo '<frame Cosmetic directives>'
					fheight
					fwidth
					ftreedefaulticon
				echo '</frame>';;
			"vseparator" );;
			"window" ) 
				echo '<frame Cosmetic attributes>'
					fselectappicon
				echo '</frame>';;
 			* ) echo "";;
		esac
echo '</vbox>'
};export -f SectionCosmetic

function SectionInputOutput()
{
source $PROGTMP/widget
echo '
<vbox space-fill="false" space-expand="true">
	'"$(gmH3 "$GMICON_MAST_IO" "Input &amp; Output" 'Data manipulations.')"'

'
	case $widget in
			"button" )
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"checkbox" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"colorbutton" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"comboboxentry" )
				echo '<frame Input Output directives>'
					flistitem
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"comboboxtext" )
				echo '<frame Input Output directives>'
					flistitem
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"combobox" );;
			"edit" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"entry" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"eventbox" ) ;;
			"expander" )
				echo '<frame Input Output directives>'
					flistitem
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"fontbutton" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"frame" ) 
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>';;
			"hbox" ) ;;
			"hscale" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"hseparator" ) ;;
			"list" )
				echo '<frame Input Output directives>'
					flistitem
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"menubar" ) ;;
			"menuitemseparator" ) ;;
			"menuitem" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"menu" )
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"notebook" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"pixmap" ) 
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"progressbar" ) ;;
			"radiobutton" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"separator" ) ;;
			"spinbutton" ) 
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"statusbar" ) 
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"table" ) 
				echo '<frame Input Output directives>'
					flistitem
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"terminal" ) 
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"text" ) 
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"timer" ) 
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"togglebutton" )
				echo '<frame Input Output attributes>'
					finput
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"tree" ) 
				echo '<frame Input Output directives>'
					flistitem
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"vbox" ) ;;
			"vscale" )
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
			"vseparator" ) ;;
			"window" ) 
				echo '<frame Input Output directives>'
					finput
					finputfile
					foutputfile
				echo '</frame>'
				echo '<frame Input Output attributes>'
					ffilemonitor
					fautorefresh
				echo '</frame>';;
 			* ) echo "";;
		esac
echo '</vbox>'
};export -f SectionInputOutput
function SectionLayout()
{
source $PROGTMP/widget
echo '
<vbox space-fill="false" space-expand="true">
	'"$(gmH3 "$GMICON_MAST_LAYOUT" "Layout &amp; Functional" 'Location, size and is it active ?')"'
'
	case $widget in
			"button" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
					fhomogeneous
				echo '</frame>';;
			"checkbox" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"colorbutton" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"comboboxentry" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
					ftearoff
				echo '</frame>';;
			"comboboxtext" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
					ftearoff
				echo '</frame>';;
			"combobox" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"edit" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"entry" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"eventbox" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"expander" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"fontbutton" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"frame" ) ;;
			"hbox" ) 
				echo '<frame Layout attributes>'
					fhomogeneous
					fspacing
					fscrollable
					fhscrollbar
					fvscrollbar
					fshadowtype
				echo '</frame>';;
			"vbox" ) 
				echo '<frame Layout attributes>'
					fhomogeneous
					fspacing
					fscrollable
					fhscrollbar
					fvscrollbar
					fshadowtype
				echo '</frame>';;
			"hscale" ) 
				#echo '<frame Layout directives>'
				#	fpositionmark
				#echo '</frame>'
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"vscale" )
				#echo '<frame Layout directives>'
				#	fpositionmark
				#echo '</frame>'
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"hseparator" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"vseparator" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"list" )
				echo '<frame Layout attributes>'
					fscrollable
					fhscrollbar
					fvscrollbar
					fshadowtype
				echo '</frame>';;
			"menubar" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"menuitemseparator" ) ;;
			"menuitem" ) 
				echo '<frame Layout attributes>'
					fmenuimage
					faccelkey
					faccelmod
					fmenucheckbox
					fmenuradiobutton
				echo '</frame>';;
			"menu" )
				echo '<frame Layout attributes>'
					fmenuimage
				echo '</frame>';;
			"notebook" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"pixmap" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"progressbar" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"radiobutton" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"separator" ) ;;
			"spinbutton" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"statusbar" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"table" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
					fscrollable
					fhscrollbar
					fvscrollbar
					fshadowtype
				fexportedcolumn
				fselectedrow
				fcolumnheaderactive
				fcolumnvisible
				fautosort
				fsortcolumn
				fsortfunction
				ffreezethaw
				fitem
				echo '</frame>';;
			"terminal" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
					fscrollable
					fhscrollbar
					fvscrollbar
					fshadowtype
				echo '</frame>';;
			"text" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
				echo '</frame>';;
			"timer" ) 
				echo '<frame Layout attributes>'
				ftimervisible
				echo '</frame>';;
			"togglebutton" )
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
					fhomogeneous
				echo '</frame>';;
			"tree" ) 
				echo '<frame Layout attributes>'
					fspaceexpand
					fspacefill
					fscrollable
					fhscrollbar
					fvscrollbar
					fshadowtype
				echo '</frame>';;
			"window" ) 
				echo '<frame Layout attributes>'
					fborderwidth
				echo '</frame>';;
 			* ) echo "";;
		esac
echo '</vbox>'
};export -f SectionLayout
function SectionSignal()
{
#   '"$(SectionLanguage)"'
echo '
<vbox space-fill="false" space-expand="true">
	'"$(gmH3 "$GMICON_MAST_ACTION" "Signal &amp; Event" 'If this clicked, that will...')"'
		<frame Actions and Events directive>'
			fselectaction
			fselectevent
		fsignals
	echo '</frame>'
echo '</vbox>'
};export -f SectionSignal


########################################################################

function mouldDirective()
{
#mouldDirectivek "label" vUseLabel "vLabel"
#   '"$(mouldDirective tag checkbox  content)"'
local tag=$1
local use=$2
local content=$3
if [ -n "${use}" ]
then
	if [  "${!use}" = "true" ]
	then
		echo "${vGUID}${use}=\"${!use}\"" >> $ResourceFile
		echo "${vGUID}${content}=\"${!content}\"" >> $ResourceFile
		echo "	<$tag>${!content}</$tag>" >> $XMLFile
	fi
fi
};export -f mouldDirective
function mouldAttribute()
{
#   '"$(mouldCreateAttr attribute checkbox  value)"'
local attribute=$1
local use=$2
local value=$3
if [ -n "${use}" ]
then
	if [  "${!use}" = "true" ]
	then
		echo "${vGUID}${use}=\"${!use}\"" >> $ResourceFile
		echo "${vGUID}${value}='${!value}'" >> $ResourceFile
		ATT=$ATT" "$attribute'="'${!value}'"'
	fi
fi
};export -f mouldAttribute
function mouldAttributeEnum()
{
#   '"$(mouldAttributeEnum shadow-type vUseShadowType vShadowType 0)"'
local attribute=$1
local use=$2
local name=$3
local value=$4
if [ -n "${use}" ]
then
	if [  "${!use}" = "true" ]
	then
		echo "${vGUID}${use}=\"${!use}\"" >> $ResourceFile
		echo "${vGUID}${name}=\"${!name}\"" >> $ResourceFile
		ATT=$ATT" "$attribute'="'${value}'"'
	fi
fi
};export -f mouldAttributeEnum
function mouldIOFileDirective()
{
local tag=$1
local use=$2
local value=$3
#   '"$(mouldDirective tag use value)"'
if [ -n "${use}" ]
then
	if [  "${!use}" = "true" ]
	then
		echo "${vGUID}${use}=\"${!use}\"" >> $ResourceFile
		echo "${vGUID}${value}=\"${!value}\"" >> $ResourceFile
		echo "	<${tag} file>${!value}</${tag}>" >> $XMLFile
	fi
fi
};export -f mouldIOFileDirective
function mouldActionDirective()
{
local use=$1
local value=$2
#   '"$(mouldDirective tag use value)"'
if [ -n "${use}" ]
then
	if [  "${!use}" = "true" ]
	then
		echo "${vGUID}${use}=\"${!use}\"" >> $ResourceFile
		echo "${vGUID}${value}=\"${!value}\"" >> $ResourceFile
		if [ -e "${!value}" ]
		then
			cat "${!value}" >> $XMLFile
		else
			echo "<action>gActionNothing</action>" > "${!value}"
		fi
	fi
fi
};export -f mouldActionDirective
function mouldVariableDirective()
{
local tag=$1
local use=$2
local value=$3
if [ -n "${use}" ]
then
	if [  "${!use}" = "true" ]
	then
		if [ "$vUseVariableExport" = "true" ]
			then
				echo "${vGUID}${value}=\"${!value}\"" >> $ResourceFile
				echo "${vGUID}vUseVariableExport=\"$vUseVariableExport\"" >> $ResourceFile
				echo "${vGUID}vVariableExport=\"$vVariableExport\"" >> $ResourceFile
				echo "	<${tag} export=\"$vVariableExport\">${!value}</${tag}>" >> $XMLFile
			else
				echo "${vGUID}${value}=\"${!value}\"" >> $ResourceFile
				echo "	<${tag}>${!value}</${tag}>" >> $XMLFile
		fi
	fi
fi
};export -f mouldVariableDirective
function FileDeleteItem()
{
	#<action>echo psed -e "s/"$TREEITEMICON"||//g" '$PROGTMP'/vModelBuilderTree > '$PROGTMP'/vModelBuilderTreetmp; mv -f '$PROGTMP'/vModelBuilderTreetmp '$PROGTMP'/vModelBuilderTree; echo " " >> '$PROGTMP'/vModelBuilderTree</action>
	grep --invert-match "$2" $1 > $PROGTMP/FileDeleteItem
	rm -f $1
	cp --force $PROGTMP/FileDeleteItem $1
};export -f FileDeleteItem
function FileUpdateItem
{
	grep --invert-match "$2" $1 > $PROGTMP/FileUpdateItem
	#sed -e "/^$/d" $PROGTMP/FileUpdateItem > $PROGTMP/FileUpdateItem
	# remove specific gtk-add||
	#sed -e "s/"$3"||//g" $1 
	echo "$3" >> $PROGTMP/FileUpdateItem
	rm -f $1
	cp --force $PROGTMP/FileUpdateItem $1
};export -f FileUpdateItem
function mouldCreateXML()
{
source $PROGTMP/widget
#TODO source $PROGLIB/widgetsignal.txt
#
vGUID=$vVariable
if [ -n "$vVariable" ]
then
	if [ "$vGUID" != "$vVariable" ]
	then
		vGUID=$vVariable
	fi
fi
local ResourceFile=$PROJECTDIR/src/res/$vGUID.res
export XMLFile=$PROJECTDIR/src/xml/$vGUID.gxml
if [ ! -e "$PROJECTDIR/src/data/$vGUID.action" ]
then
	echo "<action>command:gActionNothing</action>" >  "$PROJECTDIR/src/data/$vGUID.action" 
fi
if [ ! -e "$PROJECTDIR/src/data/$vGUID.event" ]
then
	echo "<action signal=\"enter-notify-event\">echo \"$vGUID:Whoah, mouse pointer is on me, should pretend busy \"</action>" >  "$PROJECTDIR/src/data/$vGUID.event" 
fi
echo 'Creating '$widget' XML'
echo "${vGUID}vGUID=\"$vGUID\"" > $ResourceFile
echo "${vGUID}widget=\"$widget\"" >> $ResourceFile
echo "Saving " $PROJECTDIR/src/ProjectWidgetList
FileDeleteItem $PROJECTDIR/src/ProjectWidgetList "$vGUID"

echo "gmould-ui-$widget|$widget|$vGUID" >> $PROJECTDIR/src/ProjectWidgetList
echo "#! /usr/sbin/gtkdialog --include=conf.h -f " > $TESTFILE
echo "<window title=\"Testing the widget\" icon-name=\"gtk-execute\" resizable=\"true\" window_position=\"1\" height-request=\"200\" width-request=\"200\"><vbox space-expand=\"false\" space-fill=\"false\">
<button><label>ShowEnviroment</label><action>ShowEnviroment</action></button>
<button><label>Exit</label><input file icon=\"application-exit\"></input><action>exit:Done</action></button>

" >> $TESTFILE
export ATT="<"$widget
# attributes
#if [ $widget == 'frame' ] #frame doesnt have attribute
#then
#	if [ $vUseAttributeLabel = "true" ]
#	then
#		export ATT=$ATT`mouldCreateAttr $vUseAttributeLabel $vAttributeLabel`
#	else
#		export ATT=$ATT`mouldCreateAttr $vUseAttributeLabel label=\"$vAttributeLabel\"`
#	fi
#fi
# export ATT=$ATT`
#echo  $vUseSpaceExpand space-expand $vSpaceExpandIsTrue > b.txt

echo 'Start building '$widget' attributes'
mouldAttribute space-expand vUseSpaceExpand  vSpaceExpand
mouldAttribute space-fill vUseSpaceFill vSpaceFill
mouldAttribute homogeneous vUseHomogeneous vHomogeneous
mouldAttribute auto-refresh vUseAutoRefresh vAutoRefresh
mouldAttribute file-monitor vUseFileMonitor vFileMonitor
mouldAttribute block-function-signals vUseBlockSignal vBlockSignal
mouldAttribute scrollable vUseScrollable vScrollable
mouldAttribute use-alpha vUseAlpha vAlpha
mouldAttribute milliseconds vUseMiliseconds vMiliseconds
mouldAttribute visible vUseTimerVisible vTimerVisible
mouldAttribute use-font vUseDisplayFont vDisplayFont
mouldAttribute use-size vUseDisplaySize vDisplaySize
mouldAttribute has-frame vUseHasFrame vHasFrame
mouldAttribute add-tearoffs vUseTearOff vTearOff

echo 'Start building '$widget' directives'
 
mouldAttribute selected-row vUseDefaultItem vDefaultItem
mouldAttribute spacing vUseSpacing vSpacing
mouldAttribute theme-icon-size vUseThemeIconSize vThemeIconSize
mouldAttribute range-value vUseDefaultRange vDefaultRange
mouldAttribute range-step vUseRangeStep vRangeStep
mouldAttribute range-min vUseRangeMin vRangeMin
mouldAttribute range-max vUseRangeMax vRangeMax
mouldAttribute interval vUseInterval vInterval
mouldAttribute fs-action vUseFSType vFSType
mouldAttribute fs-folder vUseFSFolder "vFSFolder"
mouldAttribute fs-title vUseFSTitle "vFSTitle"
mouldAttribute fs-filters vUseFSFilter "vFSFilter"
mouldAttribute fs-filters-mime vUseFSFilterMime "vFSFilterMime"
mouldAttribute image-name vUseAppIcon "vAppIcon"
mouldAttribute border-width vUseBorderWidth "vBorderWidth"
# afifio:notebook is being upgraded by thunor, attributes were duplicated for backward compat
# this will take some time for the transition to happen-20131018
mouldAttribute page vUseTabBaseIndex vTabBaseIndex
mouldAttribute tab-base-index vUseTabBaseIndex vTabBaseIndex
mouldAttribute tab-prefix vUseTabPrefix "vTabPrefix"
mouldAttribute tab-suffix vUseTabSuffix "vTabSuffix"

#mouldAttribute stock-id $UseTreeDefaultIcon "vTreeDefaultIcon"
# this is line 52 ? wth ?
if [ "$vUseTabPosition" = "true" ]
then
	source $PROGTMP/vTabPosition
	mouldAttribute tab-pos vUseTabPosition "vTabPosition"
fi
if [ "$vUseTreeDefaultIcon" = "true" ]
then
	mouldAttribute stock-id vUseTreeDefaultIconStock "vTreeDefaultIcon"
	mouldAttribute icon-name vUseTreeDefaultIconTheme "vTreeDefaultIcon"
	mouldAttribute icon-name vUseTreeDefaultIconCustom "vTreeDefaultIcon"
fi

if [ "$widget" == "notebook" ] #specific for notebook, page default forced to 3
then
	if [ "$vUseTabLabel" = "true" ]
	then
		mouldAttribute tab-labels vUseTabLabel "vTabLabel"
		mouldAttribute labels vUseTabLabel "vTabLabel"
	else
		mouldAttribute tab-labels true "Section 1|Section 2|Section 3"
		mouldAttribute labels true "Section 1|Section 2|Section 3"
	fi
fi
# notebook  show-tabs="false" enable-popup="true"
case $vHScrollBar in
			"Always" )		mouldAttributeEnum hscrollbar-policy vUseHScrollBar vHScrollBar 0;;
			"Automatic" )	mouldAttributeEnum hscrollbar-policy vUseHScrollBar vHScrollBar 1;;
			"Never" )		mouldAttributeEnum hscrollbar-policy vUseHScrollBar vHScrollBar 2;;
				*)		mouldAttributeEnum hscrollbar-policy vUseHScrollBar vHScrollBar 0;;
esac
case $vVScrollBar in
			"Always" )		mouldAttributeEnum vscrollbar-policy vUseVScrollBar vVScrollBar 0;;
			"Automatic" )	mouldAttributeEnum vscrollbar-policy vUseVScrollBar vVScrollBar 1;;
			"Never" )		mouldAttributeEnum vscrollbar-policy vUseVScrollBar vVScrollBar 2;;
				*)		mouldAttributeEnum vscrollbar-policy vUseVScrollBar vVScrollBar 0;;
esac
case $vShadowType in
			"None" )		mouldAttributeEnum shadow-type vUseShadowType vShadowType 0;;
			"Bevelled In" )	mouldAttributeEnum shadow-type vUseShadowType vShadowType 1;;
			"Bevelled Out" )	mouldAttributeEnum shadow-type vUseShadowType vShadowType 2;;
			"Sunken 3D" )	mouldAttributeEnum shadow-type vUseShadowType vShadowType 3;;
			"Raised 3D" )	mouldAttributeEnum shadow-type vUseShadowType vShadowType 4;;
				*)		mouldAttributeEnum shadow-type vUseShadowType vShadowType 0;;
esac
case $vUseIconStock in
			"Button")		mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock 4;;
			"Menu" )		mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock 1;;
			"Small Toolbar" )mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock 2;;
			"Large Toolbar" )mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock 3;;
			"Drag n drop" )	mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock 5;;
			"Dialog" )		mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock  6;;
			"None" )		mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock 0;;
				*)		mouldAttributeEnum stock-icon-size vUseIconStockSize vUseIconStock 4;;
esac
mouldAttribute theme-icon-size vUseIconThemeSize vIconThemeSize
if [ "$vUseIconPosition" = "true" ]
then
	source $PROGTMP/vIconPosition
	mouldAttribute image-position vUseIconPosition vIconPosition
fi


# source /tmp/gmould/iconposition
#mouldCreateAttr $vUseIconPos "image-position=\"$vIconPosition\""

# attributes writing
echo "$ATT>" > $XMLFile
# tag writing
if [ "$widget" == "notebook" ]
then
	echo "<vbox><text><label>The aliens are coming</label></text><button ok><action>echo OK</action></button></vbox>" >> $XMLFile
	echo "<vbox><text><label>We cannot cancel their plan</label></text><button cancel><action>echo Cancel</action></button></vbox>" >> $XMLFile
	echo "<vbox><text><label>I think we need help</label></text><button help><action>echo Help</action></button></vbox>" >> $XMLFile
fi
if [ "$widget" == "expander" ]
then
	echo "<vbox><frame><text><label>Quit peeking me, dont you have something else to do</label></text><button no><action>echo Test component "$widget"</action></button></frame></vbox>" >> $XMLFile
fi
if [ "$widget" == "frame" ]
then
	echo "<vbox><text><label>Why you need to frame me ? Do I look that good ?</label></text><button yes><action>echo Test component "$widget"</action></button></vbox>" >> $XMLFile
fi
if [ "$widget" == "hbox" ] 
then
	echo "<button><label>Zen Master Test</label><action>hide:"$vVariable"</action></button><text><label>Only the Zen Master can see the horizontal box, everyone else saw nothing</label></text><button ok><action>echo Test component "$widget"</action></button>" >> $XMLFile
fi
if [ "$widget" == "vbox" ] 
then
	echo "<text><label>See the box, feel the box, but be a vertical box.</label></text><button yes><action>echo Test component "$widget"</action></button>" >> $XMLFile
fi



mouldVariableDirective "variable" vUseVariable "vVariable"
mouldDirective "default" vUseFont "vFont"
mouldDirective "label" vUseLabel "vLabel"
mouldDirective "sensitive" vUseSensitive "vSensitive"
mouldDirective "default" vUseDefaultBool "vDefaultBool"
mouldDirective "width" vUseWidth "vWidth"
mouldDirective "height" vUseHeight "vHeight"
mouldDirective "default" vUseColor "vColor"
mouldDirective "default" vUseDefaultText "vDefaultText"
mouldDirective "default" vUseDefaultDouble "vDefaultDouble"
mouldDirective "input" vUseInputCommand "vInputCommand"
mouldIOFileDirective "input" vUseItemDataFile "vItemDataFile"
mouldIOFileDirective "input" vUseInputFile "vInputFile"
mouldIOFileDirective "output" vUseOutputFile "vOutputFile"
# this is line 174 ?
if [ "$vUseIcon" = "true" ]
then
	echo "${vGUID}vUseIcon=\"$vUseIcon\"" >> $ResourceFile
	if [ "$vUseIconStock" = "true" ]
	then
		echo "${vGUID}vUseIconStock=\"$vUseIconStock\"" >> $ResourceFile
		if [ -z "$vIcon" ]
		then
			echo "	<input file stock=\"gtk-info\"></input>" >> $XMLFile
		else
			echo "${vGUID}vIcon=\"$vUseIcon\"" >> $ResourceFile
			echo "	<input file stock=\"$vIcon\"></input>" >> $XMLFile
		fi
	elif [ "$vUseIconTheme" = "true" ]
	then
		echo "${vGUID}vUseIconTheme=\"$vUseIconTheme\"" >> $ResourceFile
		echo "${vGUID}vIcon=\"$vIcon\"" >> $ResourceFile
		echo "	<input file icon=\"$vIcon\"></input>" >> $XMLFile
	else   [ "$vUseIconCustom" = "true" ]
		echo "${vGUID}vUseIconCustom=\"$vUseIcon\"" >> $ResourceFile
		echo "${vGUID}vIcon=\"$vIcon\"" >> $ResourceFile
		echo "	<input file>$vIcon</input>" >> $XMLFile
	fi
fi

mouldActionDirective "vUseInputListFile" "vInputListFile"
mouldActionDirective "vUseActionFile" "vActionFile"
mouldActionDirective "vUseEventFile" "vEventFile"

echo "</"$widget">

" >> $XMLFile
cat $XMLFile >> $TESTFILE
echo "</vbox></window>" >> $TESTFILE
cat  $TESTFILE > $ACTIVEFILE

chmod +x $TESTFILE
 $TESTFILE&
};export -f mouldCreateXML
function SectionLanguage()
{
#   '"$(SectionLanguage)"'
echo '
<vbox space-fill="false" space-expand="true">
	'"$(MouldH4 gtk-apply Language 'Language selection')"'
	<text label="This is language preference page (still not developed)"></text>
</vbox>'
};export -f SectionLanguage
function SectionReset()
{
#   '"$(SectionReset)"'
echo '
<vbox space-fill="false" space-expand="true">
'"$(MouldH4 gtk-clear Reset 'Reset settings to default')"'
<text label="This is preference pagepop 1 '$1'"></text>'
echo '</vbox>'
};export -f SectionReset
function SectionFilesystem()
{
source $PROGTMP/widget
echo '
<vbox space-fill="false" space-expand="true">
	'"$(gmH3 "$GMICON_MAST_FILESYSTEM" "Filesystem Access" 'Its about the files.')"'
'
	case $widget in
			"button" );;
			"togglebutton" ) ;;
			"radiobutton" ) ;;
			"spinbutton" ) ;;
			"checkbox" );;
			"colorbutton" );;
			"edit" ) ;;
			"entry" )
			echo '<frame Filesystem attributes>'
				ffstype
				ffsfolder
				ffstitle
				ffsfilter
				ffsfiltermime
			echo '</frame>';;
			"comboboxentry" ) 
			echo '<frame Filesystem attributes>'
				ffstype
				ffsfolder
				ffstitle
				ffsfilter
				ffsfiltermime
			echo '</frame>';;
			"comboboxtext" )
			echo '<frame Filesystem attributes>'
				ffstype
				ffsfolder
				ffstitle
				ffsfilter
				ffsfiltermime
			echo '</frame>';;
			"hscale" ) ;;
			"vscale" ) ;;

			
			"vbox" ) ;;
			"hbox" ) ;;
			"hseparator" ) ;;
			"vseparator" ) ;;
			"frame" );;
			"notebook" ) ;;

			
			"menu" ) ;;
			"menubar" ) ;;
			"menuitem" ) ;;
			"menuitemseparator" ) ;;

			
			"window" ) ;;
			"text" ) ;;
			"progressbar" ) ;;
			"pixmap" )  ;;
			"statusbar" ) 
			echo '<frame Filesystem attributes>'
				ffstype
				ffsfolder
				ffstitle
				ffsfilter
				ffsfiltermime
			echo '</frame>';;

				
			"list" ) ;;
			"tree" ) ;;
			"timer" ) ;;

				
			"combobox" ) ;;
			"separator" ) ;;
			"table" ) ;;
 			* ) echo "";;
		esac
echo '</vbox>'
};export -f SectionFilesystem


function EditWidget()
{
source $PROJECTDIR/src/res/$1.res
export widget=$1widget
vGUID=$1vGUID
echo widget=${!widget} > $PROGTMP/widget
echo vGUID=${!vGUID} >> $PROGTMP/widget
DialogSectional WidgetGenerator mouldCreateXML ${!vGUID}
};export -f EditWidget


function SetupWidget()
{
echo widget=$1 > $PROGTMP/widget
DialogSectional WidgetGenerator mouldCreateXML $1
};export -f SetupWidget
########################################################################
# MouldHeadersTest - Testing the widgets
# Usage: MouldHeadersTest
########################################################################
function MouldHeadersTest()
{
echo '<hbox homogeneous="true">'
	MouldH1 gmouldheader.svg "Header 1" "Header 1 Description text."
	MouldH2 gmouldheader.svg "Header 2" "Header 2 Description text."
echo '</hbox>'
echo '<hbox homogeneous="true">'
	gmH3 gmouldheader.svg "Header 3" "Header 3 Description text."
	MouldH4 gmouldheader.svg "Header 4" "Header 4 Description text."
echo '</hbox>'
echo '<hbox homogeneous="true">'
	MouldH5 gmouldheader.svg "Header 5" "Header 5 Description text will NOT wrap."
	MouldH6 gmouldheader.svg "Header 6" "Header 6 Description text will NOT wrap. Can be use to display bits more information."
echo '</hbox>'
};export -f MouldHeadersTest

function TabMenuDialog()
{
echo '
	<button relief="2" theme-icon-size="48" image-position="2" homogeneous="true">
		<label>About</label>
		<action>XMLRunDialog About</action>
		<input file icon="'$GMICON_MAST_ABOUT'"></input>
	</button>
	<button relief="2" theme-icon-size="48" image-position="2" homogeneous="true">
		<label>Log</label>
		<action>XMLRunDialog Log</action>
		<input file icon="'$GMICON_MAST_LOG'"></input>
	</button>
	<button theme-icon-size="16">
		<label>SelectApplicationLayout</label>
		<action>XMLRunDialog SelectApplicationLayout</action>
		<input file icon="document-page-setup"></input>
	</button>'
};export -f TabMenuDialog


function TabMenuEditor()
{
echo '
	<button relief="2" theme-icon-size="48" image-position="2">
		<label>New Project</label>
		<action>XMLRunDialog CreateNewProject</action>
		<input file icon="'$GMICON_MAST_PROJECT'"></input>
	</button>
<vseparator></vseparator>
<button relief="2" theme-icon-size="48" image-position="2">
	<label>XML</label>
	<input file icon="'$GMICON_MAST_XML'"></input>
	<action>XMLRunDialog EditorXML</action>
</button>
	<button relief="2" theme-icon-size="48" image-position="2">
		<label>Script</label>
		<input file icon="'$GMICON_MAST_SCRIPT'"></input>
		<action>XMLRunDialog EditorScript</action>
	</button>
<vbox  space-expand="false" space-fill="false" spacing="0" padding="0" margin="0">
	<button relief="2" theme-icon-size="32" image-position="0" homogeneous="true">
		<label>Text</label>
		<input file icon="'$GMICON_MAST_TEXT'"></input>
		<action>XMLRunDialog EditorText</action>
	</button>
	<button relief="2" theme-icon-size="32" image-position="0" homogeneous="true">
		<label>Markup</label>
		<input file icon="'$GMICON_MAST_MARKUP'"></input>
		<action>XMLRunDialog EditorMarkup</action>
	</button>
</vbox>
<vseparator></vseparator>
	<button relief="2" theme-icon-size="48" image-position="2">
		<label>Input Output</label>
		<input file icon="'$GMICON_MAST_IO'"></input>
		<action>XMLRunDialog InputManager</action>
	</button>
	<button relief="2" theme-icon-size="48" image-position="2">
		<label>Event</label>
		<input file icon="'$GMICON_MAST_EVENT'"></input>
		<action>XMLRunDialog EventManager</action>
	</button>
	<button relief="2" theme-icon-size="48" image-position="2">
		<label>Action</label>
		<input file icon="'$GMICON_MAST_ACTION'"></input>
		<action>XMLRunDialog ActionManager</action>
	</button>
		<button relief="2" theme-icon-size="48" image-position="2">
			<label>List Builder</label>
			<input file icon="'$GMICON_MAST_LIST'"></input>
			<action>XMLRunDialog ListBuilder</action>
		</button>
'
};export -f TabMenuEditor
function TabMenuManager()
{
echo '
	<vbox  space-expand="false" space-fill="false" spacing="0" padding="0" margin="0">
		<button relief="2" theme-icon-size="32" image-position="0" homogeneous="true">
			<label>In development - Shell</label>
			<input file icon="'$GMICON_MAST_SHELL'"></input>
			<action>XMLRunDialog ShellDataSource ACTIVEFILE</action>
		</button>
	</vbox>
	<vseparator></vseparator>
	<vbox  space-expand="false" space-fill="false" spacing="0" padding="0" margin="0">
		<button relief="2" theme-icon-size="32" image-position="0" homogeneous="true">
			<label> In development - Builder</label>
			<input file icon="'$GMICON_MAST_ACTION'"></input>
			<action>XMLRunDialog ActionBuilder</action>
		</button>
		<button relief="2" theme-icon-size="32" image-position="0" homogeneous="true">
			<label> In development - Selector</label>
			<input file icon="'$GMICON_MAST_ACTION'"></input>
			<action>XMLRunDialog ActionSelector</action>
		</button>
	</vbox>
	<vseparator></vseparator>
	<vbox  space-expand="false" space-fill="false" spacing="0" padding="0" margin="0">
		<button relief="2" theme-icon-size="32" image-position="0" homogeneous="true">
			<label> In development - Builder</label>
			<input file icon="'$GMICON_MAST_EVENT'"></input>
			<action>XMLRunDialog EventBuilder</action>
		</button>
		<button relief="2" theme-icon-size="32" image-position="0" homogeneous="true">
			<label> In development - Selector</label>
			<input file icon="'$GMICON_MAST_EVENT'"></input>
			<action>XMLRunDialog EventSelector</action>
		</button>
	</vbox>
	'
};export -f TabMenuManager
function TabMenuComponent()
{
echo '
	<vbox  space-expand="false" space-fill="false" spacing="0" padding="0" margin="0">
		<button theme-icon-size="16">
			<label>SelectIcon</label>
			<action>XMLRunDialog IconChooser</action>
			<input file icon="'$GMICON_MAST_ICON'"></input>
		</button>
		<button theme-icon-size="16">
			<label>Choose Stock Icon</label>
			<action>XMLRunDialog IconChooseStock</action>
			<input file icon="'$GMICON_MAST_ICON'"></input>
		</button>
		<button theme-icon-size="16">
			<label>Choose Theme Icon</label>
			<action>XMLRunDialog IconChooseTheme</action>
			<input file icon="'$GMICON_MAST_ICON'"></input>
		</button>
	</vbox>	
	<button relief="2" theme-icon-size="16">
		<label>TestTabMenu</label>
		<action>XMLRunDialog TestTabMenu</action>
		<input file icon="document-page-setup"></input>
	</button>
	<button theme-icon-size="16">
		<label>TestTreeview</label>
		<action>XMLRunDialog TestTreeview vTreeviewTest</action>
		<input file icon="document-page-setup"></input>
	</button>'
};export -f TabMenuComponent
function TabMenuX()
{
echo ''
};export -f TabMenuX

: <<COMMENTBLOCK
	Commented block<variable>vProjectWidgetList</variable>
							<label></label>
							<input file icon-column="0">'$PROJECTDIR'/src/ProjectWidgetList</input>
							<output file>'$PROGTMP'/ProjectWidgetList</output>
COMMENTBLOCK

							
export vProjectWidgetList=$PROJECTDIR/src/ProjectWidgetList
export vProjectWidgetListLegend="Widget List"
export vProjectWidgetListHeaders="Widget Type|Name & File"
export vProjectWidgetListColVisible="true|true"
export vProjectWidgetListIcon="$GMICON_DOC_TAG"
export vProjectWidgetListIconColumn=' icon-column="1"'
export vProjectWidgetListEditable="true"
export vProjectWidgetListAppendable="true"
export vProjectWidgetListExportColumn="2"

export vProjectWidgetListOnInsertBefore=""
export vProjectWidgetListOnInsert=""
export vProjectWidgetListOnInsertAfter=""
export vProjectWidgetListOnCopy='<action>command:cp "$PROJECTDIR/src/data/`cat $PROGTMP/vProjectWidgetList`" "$PROJECTDIR/src/xml/CopyOf${vProjectWidgetListInput}"</action>'
export vProjectWidgetListOnEdit='<action>command:mv "$PROJECTDIR/src/data/`cat $PROGTMP/vProjectWidgetList`" "$PROJECTDIR/src/xml/$vProjectWidgetListInput"</action>'
export vProjectWidgetListOnDeleteBefore=""
export vProjectWidgetListOnDelete='
	<action>command:rm -f "$PROJECTDIR/src/xml/`cat $PROGTMP/vProjectWidgetList`.gxml"</action>
	<action>command:rm -f "$PROJECTDIR/src/res/`cat $PROGTMP/vProjectWidgetList`.res"</action>'
export vProjectWidgetListOnDeleteAfter=""
export vProjectWidgetListDirectives='<action signal="row-activated">EditWidget `cat $PROGTMP/vProjectWidgetList`</action>
<action>refresh:vProjectWidgetList</action>'
export MAIN_DIALOG='
<window title=" gmould  '"$PROGNAMEVERSION"'" icon-name="gtk-execute" resizable="true" window_position="1">
	<vbox space-fill="true" space-expand="true" spacing="0">
			<hbox space-fill="true" space-expand="false" spacing="0">
				<notebook space-expand="true" space-fill="true" tab-pos="2" tab-labels="Editors|Managers|Dialogs|Components" labels="Editors|Managers|Dialogs|Components">
					<hbox space-expand="false" space-fill="false" homogeneous="false" spacing="0">
						'"$(TabMenuEditor)"'
						'"$(MouldH2 $GMICON_MAST_TEXT "Editors" "Builtin text editors")"'
						<vseparator></vseparator>
						<button space-expand="false" space-fill="true" theme-icon-size="48" image-position="2" relief="2">
							<input file icon="'$GMICON_MAST_EXIT'"></input>
						</button>
					</hbox>
					<hbox space-expand="false" space-fill="false" homogeneous="false" spacing="0">
						'"$(TabMenuManager)"'
						<vseparator></vseparator>
						'"$(MouldH2 $GMICON_MAST_TEXT "Managers" "Managers dialog")"'
					</hbox>
					<hbox spacing="0">
						'"$(TabMenuDialog)"'
						<vseparator></vseparator>
						'"$(MouldH2 $GMICON_MAST_TEXT "Dialogs" "Common dialogs")"'
					</hbox>
					<hbox spacing="0">
						'"$(TabMenuComponent)"'
						<vseparator></vseparator>
						'"$(MouldH5 $GMICON_MAST_TEXT "Components" "Components test, cannot run alone.")"'
					</hbox>
					<variable>notebook15669</variable>
				</notebook>
			</hbox>
		<hseparator space-fill="true" space-expand="false"></hseparator>
		<hbox space-fill="true" space-expand="true" spacing="0">
			<vbox space-fill="true" space-expand="false" spacing="0">
			'$(gContainerHideShow ContainerLeft)'
				<vbox space-fill="true" space-expand="true" spacing="0">
					<notebook labels="Mould|Basic" tab-pos="2" space-fill="false" space-expand="false">
						<vbox spacing="0">
							<hbox homogeneous="true">
								<text space-fill="false" space-expand="true" >
								<label>Buttons</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_BUTTON "button" 'SetupWidget button' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_TOGGLEBUTTON "Toggle Button" 'SetupWidget togglebutton' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_RADIOBUTTON "Radio Button" 'SetupWidget radiobutton' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_SPINBUTTON "Spin Button" 'SetupWidget spinbutton' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_CHECKBUTTON "Check Button" 'SetupWidget checkbox' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_COLORBUTTON "Color Selection Button" 'SetupWidget colorbutton' ACTIVEEDITOR)"'
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_FONTBUTTON "Font Selection Button" 'SetupWidget fontbutton' ACTIVEEDITOR)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Input</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_EDIT "Multiline Edit Box" 'SetupWidget edit' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_ENTRY "Singleline Entry Box" 'SetupWidget entry' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_COMBOBOXENTRY "Combo Box Entry" 'SetupWidget comboboxentry' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_COMBOBOXTEXT "Combobox Text" 'SetupWidget comboboxtext' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_HSCALE "Horizontal Slider/Range" 'SetupWidget hscale' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_VSCALE "Vertical Slider/Range" 'SetupWidget vscale' ACTIVEEDITOR)"'
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Layout</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_VBOX "Vertical Layout Box" 'SetupWidget vbox' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_HBOX "Horizontal Layout Box" 'SetupWidget hbox' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_VSEPARATOR "Vertical Separator" 'SetupWidget vseparator' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_HSEPARATOR "Horizontal Separator" 'SetupWidget hseparator' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_FRAME "Frame/Legend" 'SetupWidget frame' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_NOTEBOOK "Notebook Tabs" 'SetupWidget notebook' ACTIVEEDITOR)"'
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_EXPANDER "Expander" 'SetupWidget expander' ACTIVEEDITOR)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Menus</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_MENUBAR "Menubar" 'SetupWidget menubar' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_MENU "Menu" 'SetupWidget menu' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_MENUITEM "Menu Item" 'SetupWidget menuitem' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_MENUITEMSEPARATOR "Menu Item Separator" 'SetupWidget menuitemseparator' ACTIVEEDITOR)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Misc</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_WINDOW "Window" 'SetupWidget window' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_TEXT "Text/Label" 'SetupWidget text' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_PROGRESSBAR "Progressbar" 'SetupWidget progressbar' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_PIXMAP "Pixmap" 'SetupWidget pixmap' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_STATUSBAR "Statusbar" 'SetupWidget statusbar' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_EVENTBOX "Eventbox" 'SetupWidget eventbox' ACTIVEEDITOR)"'
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton $GMICON_UI_LIST "List" 'SetupWidget list' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_TREEVIEW "Treeview" 'SetupWidget tree' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_TIMER "Timer" 'SetupWidget timer' ACTIVEEDITOR)"'
								'"$(ToolboxButton $GMICON_UI_TABLE "Table" 'SetupWidget table' ACTIVEEDITOR)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
							</hbox>
						</vbox>
						<vbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>See Sandbox after click</label>
								</text>
								<text space-fill="false" space-expand="true" >
								<label>Buttons</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton widget-gtk-button "Button" "Snip_XML_BUTTON $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-togglebutton "Toggle Button" "Snip_XML_TOGGLEBUTTON $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-radiobutton "Radio Button" "Snip_XML_RADIOBUTTON $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-spinbutton "Spin Button" "Snip_XML_SPINBUTTON $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-checkbutton "Check Button" "Snip_XML_CHECKBOX $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-colorbutton "Color Selection Button" "Snip_XML_COLORBUTTON $ACTIVEFILE" ACTIVEEDITOR)"'
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Input</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton widget-gtk-textview "Multiline Edit Box" "Snip_XML_EDIT $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-entry "Singleline Entry Box" "Snip_XML_ENTRY $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-comboboxentry "Combo Box Entry" "Snip_XML_COMBOBOXENTRY $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-combobox "Combobox Text" "Snip_XML_COMBOBOXTEXT $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-hscale "Horizontal Slider/Range" "Snip_XML_HSCALE $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-vscale "Vertical Slider/Range" "Snip_XML_VSCALE $ACTIVEFILE" ACTIVEEDITOR)"'
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Layout</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton widget-gtk-vbox "Vertical Layout Box" "Snip_XML_VBOX $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-hbox "Horizontal Layout Box" "Snip_XML_HBOX $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-vseparator "Vertical Separator" "Snip_XML_VSEPARATOR $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-hseparator "Horizontal Separator" "Snip_XML_HSEPARATOR $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-frame "Frame/Legend" "Snip_XML_FRAME $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-notebook "Notebook Tabs" "Snip_XML_NOTEBOOK $ACTIVEFILE" ACTIVEEDITOR)"'
								
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Menus</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton widget-gtk-menu "Menu" "Snip_XML_MENU $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-menubar "Menubar" "Snip_XML_MENUBAR $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-menuitem "Menu Item" "Snip_XML_MENUITEM $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-separatormenuitem "Menu Item Separator" "Snip_XML_MENUITEMSEPARATOR $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
							</hbox>
							<hbox spacing="0">
								<text space-fill="false" space-expand="true" >
								<label>Misc</label>
								</text>
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton widget-gtk-window "Window" "Snip_XML_WINDOW $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-label "Text/Label" "Snip_XML_TEXT $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-progressbar "Progressbar" "Snip_XML_PROGRESSBAR $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-image "Pixmap" "Snip_XML_PIXMAP $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-statusbar "Statusbar" "Snip_XML_STATUSBAR $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButtonBlank)"'
							</hbox>
							<hbox spacing="0">
								'"$(ToolboxButton widget-gtk-list "List" "Snip_XML_LIST $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-treeview "Treeview" "Snip_XML_TREE $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButton widget-gtk-arrow "Timer" "Snip_XML_TIMER $ACTIVEFILE" ACTIVEEDITOR)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButtonBlank)"'
								'"$(ToolboxButton widget-gtk-cellrendererpixbuf "New Component" "Snip_NEW_COMPONENT $ACTIVEFILE" ACTIVEEDITOR)"'

							</hbox>
						</vbox>
					</notebook>
					<variable>ContainerLeft</variable>
				</vbox>
			</vbox>
			<vseparator space-fill="true" space-expand="false"></vseparator>
			<vbox space-fill="true" space-expand="true" spacing="0">
			'$(gContainerHideShow Main)'
				<vbox space-fill="true" space-expand="true" spacing="0">
					<notebook space-fill="true" space-expand="true" labels="Test File|Sandbox|Notepad">
						'"$(MouldEdit  TESTEDITOR $TESTFILE)"'
						'"$(MouldEdit  ACTIVEEDITOR $ACTIVEFILE)"'
						'"$(MouldEdit  SnippetEditbox $NOTEPAD)"'
					</notebook>
					<variable>Main</variable>
				</vbox>
			</vbox>
			<vseparator space-fill="true" space-expand="false"></vseparator>
			<vbox space-fill="true" space-expand="false" spacing="0">
			'$(gContainerHideShow ContainerRight)'
					<vbox space-fill="true" space-expand="true" spacing="0">
						'"$(gmTreeView vProjectWidgetList)"'
					<variable>ContainerRight</variable>
				</vbox>
			</vbox>
		</hbox>
	</vbox>
</window>
'


